import request from './request'
import qs from 'qs'
// 轮播图
export const BannerApi = () => request.get('/banner')

// 推荐歌单
export const Tuijiange = () => request.get('/personalized?limit=8')
// export const Tuijiange = () => request.get(`/personalized?limit=5`)

// 歌手详情接口 /top/artists
export const GetSouApi = () => request.get('/top/artists?limit=6')


// 推荐电台 /personalized/djprogram
export const Tuijiandt = () => request.get(`/program/recommend`)

// 新碟推荐 /album/new
export const Newdetuijian = () => request.get(`/album/newest`)

// 二维码登录 (生成二维码) /login/qr/key
export const WeixinLogin = () => request.get(`/login/qr/key`)

// 二维码生成接口 /login/qr/create
export const GetweixinLogin = (pamers) => request.get(`/login/qr/create?key=${pamers.key}&qrimg="qrimg"`, pamers.timerstamp)

// 扫码验证 /login/qr/check
export const yanzheng = (pamers) => request.get(`/login/qr/check?key=${pamers.key}`, pamers.timerstamp)

// 手机码登录
export const PhoneLoginApi = (params) => request.get('/login/cellphone', { params })

// 验证码请求
export const CodeApi = (params) => request.post('/captcha/sent', qs.stringify(params))

// 获取用户信息 /user/detail
export const GetUresinfo = (params) => request.post('/user/detail', { params })

// 验证该手机号是否被注册过
export const ifPhoneApi = (params) => request.post('/cellphone/existence/check', qs.stringify(params))

// 所有榜单 /toplist
export const Allbangdan = () => request.get(`/toplist`)

// 歌单详情 /playlist/detail
export const Gedanxiangqing = (pamers) => request.get(`/playlist/detail?id=${pamers}`)

// 歌单所有歌曲 /playlist/track/all?id=24381616
export const Allgequ = (pamers) => request.get(`/playlist/track/all?id=${pamers}`)

// 歌单  /top/playlist order=new
export const Gedan = () => request.get(`/top/playlist`)

// 推荐节目接口 /program/recommend
export const Recommend = () => request.get("/program/recommend")

// 节目排行榜接口/dj/program/toplist?limit=1
export const ProgramList = () => request.get("/dj/program/toplist?limit=10")

// 音乐推荐接口 /dj/recommend
export const MusicRecommendation = () => request.get("/dj/hot?limit=4")

// 电台 节目推荐   /program/recommend
export const Dianttuijian = () => request.get('/program/recommend')

// 电台类型 /dj/catelist
export const Diantleixing = () => request.get('/dj/catelist')

// 电台 节目推荐榜 /dj/program/toplist
export const Diantaijiemutuijian = () => request.get('/dj/program/toplist?limit=10')

// 歌手  /artist/list
export const Geshou = (params) => request.get(`/artist/list?type=${params.type}&area=${params.area} `)

// 歌手榜 /toplist/artist
export const Getgeshouban = (params) => request.get(`/toplist/artist?type=${params.type}`)

//  热门新碟 /top/album
export const Getnewdie = (params) => request.get(`/top/album?type=${params.type}`)

// 全部新碟 /album/new
export const GetAllnewdie = (params) => request.get(`/album/new`, { params })

// 用户歌单 /user/playlist
export const Getursegedan = (params) => request.get(`/user/playlist`, { params })

// 用户歌单详情 /playlist/detail
export const Getursegedanxq = (params) => request.get(`/playlist/detail`, { params })

// 获取 mlog播放地址 /song/url   id
export const Getbofang = (id) => request({ url: `/song/url?id=${id}`, method: 'GET' })

// 搜索 功能  /cloudsearch?keywords=海阔天空
export const Sousuo = (params) => request.get(`/cloudsearch`, { params })





